//
//  ProfileInfoTableViewCell.m
//  宝宝儿歌
//
//  Created by Clement_Gu on 16/4/20.
//  Copyright © 2016年 baobaoerge. All rights reserved.
//

#import "ProfileInfoTableViewCell.h"
@interface ProfileInfoTableViewCell()
@end
@implementation ProfileInfoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
/**
 *  自定义cell
 *
 *  @param userName      用户名
 *  @param userSignature 个性签名
 *  @param userPhoto     照片
 *  @param action        更换头像事件
 *
 *  @return 自定义的cell
 */
//-(instancetype)initWithProfile:(NSString *)userName userSignature:(NSString *)userSignature userPhoto:(NSString *)userPhoto action:(SEL)action
//{
//    self = [super init];
//    if (self) {
//        
//        [self buildView:userName userSignature:userSignature userPhoto:userPhoto action:action];
//    }
//    return self;
//}
//-(instancetype)initWithProfile
//{
//    self = [super init];
//    if (self) {
//        [self buildView:self.userName userSignature:self.userSignature userPhoto:self.userPhoto action:self.action];
//    }
//    return self;
//}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

        [self buildView];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    return self;
}



///**
// *  创建界面
// *
// *  @param userName      用户名
// *  @param userSignature 个性签名
// *  @param userPhoto     用户照片
// */
//-(void)buildView:(NSString *)userName userSignature:(NSString *)userSignature userPhoto:(NSString *)userPhoto action:(SEL)action
//{
//    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, 80, 80)];
//    [self.contentView addSubview:imageView];
//    
//    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(100, 0, 55,35)];
//    label.text = @"昵称:";
//    label.font = [UIFont boldSystemFontOfSize:30];
//    label.textAlignment = NSTextAlignmentRight;
//    [self.contentView addSubview:label];
//    
//    UILabel *labelName = [[UILabel alloc]initWithFrame:CGRectMake(160, 0, 150, 35)];
//    label.font = [UIFont systemFontOfSize:30];
//    label.textAlignment = NSTextAlignmentLeft;
//    [self.contentView addSubview:labelName];
//    
//    UILabel *labelSignature = [[UILabel alloc]initWithFrame:CGRectMake(100, 40, self.contentView.bounds.size.width-100, self.contentView.bounds.size.height-40)];
//    labelSignature.textColor = [UIColor darkGrayColor];
//    labelSignature.font = [UIFont systemFontOfSize:20];
//    [self.contentView addSubview:labelSignature];
//
//    
//}
/**
 *  cell界面
 */
-(void)buildView
{
    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, 80, 80)];
    self.userPhoto = imageView;
    [self.contentView addSubview:imageView];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(100, 5, 55,30)];
    label.text = @"昵称:";
    label.font = [UIFont boldSystemFontOfSize:30];
    label.textAlignment = NSTextAlignmentRight;
    self.nichenLabel = label;
    [self.contentView addSubview:label];
    
    UILabel *labelName = [[UILabel alloc]initWithFrame:CGRectMake(160, 5, 150, 30)];
    label.font = [UIFont systemFontOfSize:22];
    label.textAlignment = NSTextAlignmentLeft;
    self.nameLabel = labelName;
    [self.contentView addSubview:labelName];
    
    UILabel *labelSignature = [[UILabel alloc]initWithFrame:CGRectMake(100, 50, self.contentView.bounds.size.width-100, 35)];
    labelSignature.numberOfLines = 0;
    labelSignature.textColor = [UIColor darkGrayColor];
    labelSignature.font = [UIFont systemFontOfSize:20];
    self.SignatureLabel = labelSignature;
    [self.contentView addSubview:labelSignature];
    
    
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
